package com.chagee.store.operation.server.model.param;

import com.chagee.store.operation.api.request.BaseRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * 查询基础任务表分页
 *
 * @Author : hk
 * @Date : 2024/7/2
 */

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StoreTaskRelationRequest extends BaseRequest implements Serializable {

	private static final long serialVersionUID = 703155978795016152L;
	//0 未开启 1开启
	private String openThreeWay;
	// 门店名称
	private String StoreName;

	// 门店编码
	private String StoreNo;

	// 任务名称
	private String taskName;

	// 任务id
	private String taskId;

	//批量删除/删除
	private List<StoreNoAndTaskIdAndTaskName> storeNoAndTaskIdList;

	@Data
	@NoArgsConstructor
	@AllArgsConstructor
	public static class StoreNoAndTaskIdAndTaskName implements Serializable{

		private static final long serialVersionUID = 7254258030317618716L;
		// 门店名称
		private String storeNo;

		// 门店名称
		private String taskId;

		// 门店名称
		private String taskName;

		//示意图
		private List<StoreTaskRelationRequest.FileVO> picture;

		//文字描述
		private String wordDescribe;


		@Override
		public boolean equals(Object o) {
			if (this == o) return true;
			if (o == null || getClass() != o.getClass()) return false;
			StoreNoAndTaskIdAndTaskName that = (StoreNoAndTaskIdAndTaskName) o;
			return Objects.equals(storeNo, that.storeNo) && Objects.equals(taskId, that.taskId);
		}

		@Override
		public int hashCode() {
			return Objects.hash(storeNo, taskId);
		}
	}

	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class FileVO implements Serializable{
		/**
		 * oss文件路径
		 */
		private String filePath;

		/**
		 * 文件名称
		 */
		private String fileName;

		/**
		 * 文件大小，byte
		 */
		private Long size;

		/**
		 * 文件类型
		 */
		private String type;

	}
}
